{% extends 'cms/base.html' %}
{% block title %}
    前台用户管理
{% endblock %}
{% block head %}
    <script src="{{ url_for('static', filename='cms/js/del_fuser.js') }}"></script>
{% endblock %}
{% block page_title %}
    前台用户管理
{% endblock %}
{% block main_content %}
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>用户ID</th>
            <th>用户名</th>
            <th>邮  箱</th>
            <th>发帖数</th>
            <th>评论数</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for user in users %}
            <tr>
                <td>{{ user.id }}</td>
                <td>{{ user.username }}</td>
                <td>{{ user.email }}</td>
                <td>{{ user.threads | length }}</td>
                <td>{{ user.comments | length }}</td>
                <td>
                    <button user_id="{{ user.id }}" class="btn btn-danger comment-del-btn">删除</button>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endblock %}